Finds tab with <span class="argument">id</span> and extends it with <span class="argument">tab</span> object.

<div class="definition">
    set(id, tab)
</div>

<div class="arguments">
    <table>
    <tr>
        <td>id</td>
        <td><b>string</b>, id of the tab object</td>
    </tr>
    <tr>
        <td>tab</td>
        <td><b>object</b>, new tab object</td>
    </tr>
    </table>
</div>

Returns boolean.

<h4>Description</h4>

The first argument <span class="argument">id</span> is the id of the tab object you used when you created tabs. The
<a class="method" href="w2tabs.tabs">.tabs</a> array holds all created tab objects. The tab object is not replaced with
<span class="argument">tab</span>, but extended by it. If you call this method it during run-time, you will need to call
<a class="method" href="w2tabs.refresh">.refresh()</a> method. If tab object was successfully extended the method will
return true, otherwise false.
<div style="height: 10px"></div>

If you have tabs defined in the following way:
<textarea class="javascript">
let tabs = new w2tabs({
    name: 'tabs',
    active: 'tab1',
    tabs: [
        { id: 'tab1', text: 'Tab 1' },
        { id: 'tab2', text: 'Tab 2' },
        { id: 'tab3', text: 'Tab 3' },
        { id: 'tab4', text: 'Tab 4' }
    ]
});
</textarea>

You can add tabs:
<textarea class="javascript">
w2ui.tabs.set('tab5', { text: 'New Caption' });
w2ui.tabs.refresh();
</textarea>